import { axios } from '@/utils/request'

export const api = {
  wechatLogin: '/auth/social/wechat/callback',
  wechatUrl: '/system/social/wechat/pc_login',
  wechatBind: '/auth/social/bind',
  SendSms: '/system/verification/start',
  Register: '/auth/register',
  changPwd: '/system/accounts/rest_pwd',
  enums: '/admin/information/getEnums/',
  getOpenMall: 'admin/mall-config/getOpenMall'
}

export function enums(type) {
  return axios({
    url: api.enums + type,
    method: 'get'
  })
}

/**
 * 下载上传任务列表
 */
export function getTaskList(params) {
  return axios({
    url: `/admin/export/pageList`,
    method: 'get',
    params
  })
}

/**
 * 根据任务ID查询任务
 * ids: 任务ID,逗号隔开
 */
export function getTaskDetail(ids) {
  return axios({
    url: `/admin/export/get/${ids}`,
    method: 'get'
  })
}

/**
 * @description 是否开通商城
 * @date 24/11/2023
 * @export
 */
export function getOpenMall() {
  return axios({
    url: api.getOpenMall,
    method: 'get'
  })
}

/**
 * 创建分享id
 * @param {*} data 
 * @returns 
 */
export function shareLogAdd(data) {
  return axios({
    url: `/admin/app-share-log/add`,
    method: 'post',
    data
  })
}
